package com.wofish.core.dto;


/**
 * 返回前端的业务状态
 */
public enum BusiStatus {

//    LOGIN_SUCCESS(1000, "用户名密码不正确"),

    TOKEN_EXPIRE(401, "token无效"),//需要用refreshToken更新新的accessToken和refreshToken
    REFRESH_TOKEN_EXPIRE(402, "refreshToken无效,需要重新登录"),//需要用refreshToken更新新的accessToken和refreshToken
    TOKEN_EXPIRE_INVALID(402, "token无效,需要重新登录"),


    USER_ERROR(1001, "用户名密码不正确"),
    USER_EXIST(1002, "用户名已存在"),
    USER_NOT_EXIST(1003, "用户不存在"),
    SERVERERROR(500, "服务器错误"),
    ;

    private final int value;

    private final String desc;

    private BusiStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public int value() {
        return this.value;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public String toString() {
        return Integer.toString(value);
    }
}